import { axios } from '@/utils/request'

/**
 * api接口列表  轮播图
 */
const api = {
    addImg: '/Rotation/add',
    getList: '/Rotation/getList',
    editState: '/Rotation/state',
    deleteImg: '/Rotation/del',
}

/**
 * 上传图片
 * @param {*} data
 */
export function addSwiper(data) {
    return axios({
        url: api.addImg,
        method: 'post',
        data
    })
}

export function getSwiper(data) {
    return axios({
        url: api.getList,
        method: 'get',
        data
    })
}

export function editSwiper(data) {
    return axios({
        url: api.editState,
        method: 'post',
        data
    })
}

export function deleteSwiper(data) {
    return axios({
        url: api.deleteImg,
        method: 'post',
        data
    })
}